<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      width: 100px;
      height: 100px;
    }
    .one{
      background-color: blue;
      
    }
    .fixed{
      background-color:yellow;
      /* 开启固定定位 fixed
        1.脱离文档流,原先位置不保留，飘在文档流上方
        2.相对于浏览器定位,
      */
      position: fixed;
      right: 50px;
      bottom: 50px;
    }
  </style>
</head>

<body>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <section>块级元素</section>
  <div class="one">
  </div>
  <div class="fixed">
    <a href="#">回到顶部</a>
  </div>
  <!-- 粘滞定位 position:sticky -->
</body>

</html>